package com.etoak.controller;


import com.etoak.common.core.vo.ResultVO;
import com.etoak.entity.Dict;
import com.etoak.service.DictService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * DictController
 *
 * @author etoak
 * @since 2025-06-28
 */
@RestController
@RequestMapping("/dict")
public class DictController {

    @Resource
    DictService dictService;


    @RequestMapping("/list")
    public ResultVO<Object> list(@RequestParam String type){
        List<Dict> list = dictService.getList(type);
        return ResultVO.success(list);
    }

}

